<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/structure.js"></script>
    <script src="../js/common.js"></script>
    <script>
        let count=0;
        let time    
        let canvas
        let nextBlock
        let mapArray=[]
        let block=new creatB();
        onload=function(){
            let arr=[];
            for(let i=0;i<20;i++){
                for(let j=0;j<10;j++){
                    arr.push(false)
                }
                mapArray.push(arr);
                arr = []
            }
            canvas=new creatC("#mycanvas",30)
            block =new creatB();
            nextBlock = new creatB();                                                                   
            canvas.init();  
        }
    </script>
    <style>
        .center{
            width: 600px;
            margin:  auto;
        }
        .button{
            width: 600px;
            margin: auto;
            
        }
        button{
            width: 100px;
            height: 50px;
            background-color: cornflowerblue;
            font-size: 20px;
            position: relative;
            border-radius: 5px;
            outline: none;
            border: none;
        }
        .item{
            position: absolute;
            top: 300px;
            left: 790px;
            margin-top: 60px;
        }
        .itemTwo{
            position: absolute;
            top: 420px;
            left:790px;
            margin-top: 20px;
        }
    </style>
</head>
<body>
   <div class="center">
        <canvas id="mycanvas"></canvas>
   </div>
   <div class="button">
       <div class="item">
            <button onclick="start();">开始</button>
       </div>
       <div class="itemTwo">
        <button onclick="stop();" ondblclick="play();">结束</button>
       </div>
      
   </div>
   
</body>
</html>
